package code.google.model.player.states;

import code.google.model.util.interfaces.ISong;

public class PausingLocalState extends State {

	public PausingLocalState(StateManager manager) {
		super(manager);
	}

	@Override
	public boolean play() {
		player.start();
		manager.setCurrentState(manager.getPlayingLocalState());
		return true;
	}

	@Override
	public boolean seekTo(int position) {
		player.seekTo(position);
		return true;
	}

	@Override
	public boolean play(ISong song) {
		destroyMediaPlayer();
		manager.setCurrentState(manager.getStartState());
		return manager.getStartState().play(song);
	}

}
